package kr.or.kosta.otr.persistence.industry;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.HashMap;

import javax.annotation.Resource;

import kr.or.kosta.otr.vo.IndustryVO;

import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;

@Repository("IndustryDao")
public class IndustryDaoImpl implements IndustryDao{
	@Resource(name="sqlMapClient")
	private SqlMapClient sqlMapClient;
	
	@Override
	public ArrayList<IndustryVO> getAllIndustry() throws SQLException {
		return (ArrayList<IndustryVO>)sqlMapClient.queryForList("Industry.getAllIndustry");
	}

	@Override
	public IndustryVO getIndustry(HashMap<String, Object> map) throws SQLException {
		return (IndustryVO)sqlMapClient.queryForObject("Industry.getIndustry", map);
	}
}
